package com.todod.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.todod.dto.DataLogDto;
import com.todod.entity.QueryEntry;
import com.todod.entity.ResultData;
import com.todod.service.IDataLogService;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author gsh
 * @since 2020-10-14
 */
@RestController
@RequestMapping("/dataLog")
public class DataLogController {

	@Autowired
	private IDataLogService dataLogService;

	/**
	 * 获取登陆日志列表
	 * 
	 * @Title: getPage
	 * @Description:
	 * @author gsh
	 * @date 2020年4月12日
	 * @param queryEntry
	 * @return
	 */
	@GetMapping("/getPage")
	public ResultData getPage(QueryEntry queryEntry) {
		IPage<DataLogDto> page = dataLogService.getPage(queryEntry);

		return ResultData.success("ok", page);
	}

	/**
	 * @Title: getPage
	 * @Description:获取登陆日志列表
	 * @author dyl
	 * @date 2021-11-29
	 * @param queryEntry
	 * @return
	 */
	@GetMapping("/getPage2")
	public ResultData getPage2(QueryEntry queryEntry) {
		IPage<DataLogDto> page = dataLogService.getPage2(queryEntry);

		return ResultData.success("ok", page);
	}

}
